package ClassWork.Work_03.Student;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("Enter the number of the student");
        int n = sc.nextInt();
        Student[] stu = new Student[n];
        int c = 0;
        while (c < stu.length) {
            System.out.println("Enter the name of the student");
            String name = sc.next();
            System.out.println("Enter the id of the student");
            int id = sc.nextInt();
            System.out.println("Enter the score of the student");
            double score = sc.nextDouble();
            stu[c++] = new Student(name, id, score);
        }
        StudentService service = new StudentService();
        service.BubbleSort(stu);
        service.OutPut(stu);
    }
}
